<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>速翔网络</title>

	<style>
	html {
		font-family: "Helvetica Neue", Helvetica, sans-serif;
		font-size: 20px;
	}

	html,
	body {
		-webkit-touch-callout: none;
		-webkit-text-size-adjust: none;
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
		-webkit-user-select: none;
		width: 100%;
		margin: 0;
		border: 0;
		padding: 0;
		font-style: normal;
	}

	body {
		line-height: 1.5;
		font-size: 0.8rem;
		color: #fff;
		/*background: #000 !important;*/
		/*background: url('../i/bg.gif');*/
		outline: 0;
	}



	#loadingdi_huifu-s {
		display: flex;
		width: 100%;
		justify-content: center;
		align-items: center;
		height: 500px;
		text-align: center;
		margin: 0 auto;
		flex-direction: column;
	}

	#loadingdi_huifu-s img {
		-webkit-animation: rotation .65s 0s linear infinite;
		animation: rotation .65s 0s linear infinite;
		display: inline-block;
	}

	@-webkit-keyframes rotation {
		0% {
			-webkit-transform: rotate(0deg) scale(1);
			transform: rotate(0deg) scale(1)
		}
		50% {
			-webkit-transform: rotate(180deg) scale(.6);
			transform: rotate(180deg) scale(.6)
		}
		100% {
			-webkit-transform: rotate(360deg) scale(1);
			transform: rotate(360deg) scale(1)
		}
	}

	#loadingdi_huifu-s img {
		width: 2rem;
		height: 2rem;
	}

	#loadingdi_huifu-s div {
		padding-top: 1rem;
		font-size: 0.8rem;
		text-shadow:1px 2px 5px #fff;
		line-height: 1.5rem;
	}
	</style>
</head>

<body>
	<!-- <div id="loadingdi_huifu-s"><img src="../i/footer_progress.png" />
		<div>出售APP短视频源码<br />微信/电话: 156 2228 9461</div>
	</div> -->
</body>
<script type="text/javascript" src="../j/api.js"></script>
<script type="text/javascript" src="../j/suxiangw.js"></script>
<script type="text/javascript" src="../j/video.js"></script>
<script type="text/javascript" src="../j/crypto-js.js"></script>
<script type="text/javascript">
	var _root_name = 'index_list',
		rong, _root = 0,frameName,
		pause_start = true // playModule UIPLPlayer  plPlayer video alivcLivePlayer
	apiready = function() {
		// $api.css($api.byId('loadingdi_huifu-s'), 'height:' + (api.winHeight - 100) + 'px');
if(adName){
	_init_ad();
	ad = api.require(adName);
}

		// if(_win_name == 1){
		//
		// }else{
		// 	play_init();
		// }
		win();
		// 状态栏
		_heibai();
		// 在登录状态下执行融云初始化
		// 回到屏幕
		api.addEventListener({
			name: 'viewappear'
		}, function(ret, err) {
			if(frameName == 'oxPlayer_frm'){
				api.execScript({
					frameName: 'oxPlayer_frm',
					script: 'isPlaying(true);'
				});
			}else{
				api.execScript({
					frameName: 'oxPlayer_frm',
					script: 'isPlaying();'
				});
			}
		});
		// 离开屏幕
		api.addEventListener({
			name: 'viewdisappear'
		}, function(ret, err) {

		});
		//应用进入后台事件
		api.addEventListener({
			name: 'pause'
		}, function(ret, err) {});
		// 应用从后台回到前台事件
		api.addEventListener({
			name: 'resume'
		}, function(ret, err) {
			 kouling();
		});
	}


	// 打开底部菜单
	function index_footer() {
		url = 'index_footer'
		api.openFrame({
			name: url,
			url: _h_w + url + '.html',
			rect: {
				x: 0,
				y: 0,
				w: 0,
				h: 0,
			},
			bgColor: 'rgba(0,0,0,0)',
		})
	}

	function index_header() {
		url = 'index_header'
		api.openFrame({
			name: url,
			url: _h_w + url + '.html',
			rect: {
				x: 0,
				y: 0,
				w: 0,
				h: 0,
			},
			bgColor: 'rgba(0,0,0,0)',
		})
	}

	function win() {
		index_header();
		index_footer();
		if(_win_name == 1){
			var name = ['index_guanzhu', 'scrollVideo','tongcheng','zhibo_index'];
		}else if(_win_name == 2){
			var name = ['index_guanzhu', 'oxPlayer_frm','tongcheng','zhibo_index'];
		}else{
			var name = ['index_guanzhu', 'index_list'];
		}
		var frames = [];
		for (var i = 0; i < name.length; i++) {
			var frame = {};
			frame.name = name[i];
			frame.url = _h_w + name[i] + '.html';
			frame.bgColor = 'rgba(0,0,0,0)';
			frame.pageParam = {
				name: name[i],
				index: i,
			}
			frames.push(frame);
		}
		openFrameGroup(frames)
	}

	function openFrameGroup(frames) {
		//console.info(JSON.stringify(frames))
		api.openFrameGroup({
			name: 'index',
			bounces: false,
			// scrollEnabled:true,
			rect: {
				x: 0,
				y: 0,
				w: 'auto',
				h: 'auto',
			},
			frames: frames,
			index: 1,
			preload: 0, // 预加载的 frame 个数，默认加载当前页后面一个
		}, function(ret, err) {
			frameName = ret.name;
			api.bringFrameToFront({
				from: 'index_header',
			});
			api.bringFrameToFront({
				from: 'index_footer',
			});
			if (ret.name) {
				_root_name = ret.name;
			}

			if (_root) {
				// api.execScript({
				// 	frameName: 'index_list_'+ret.index,
				// 	script: 'video_loading(1)'
				// });
				api.execScript({
					frameName: 'index_header',
					script: 'cla(' + ret.index + ')'
				});
				if(_win_name == 0){
					setTimeout(function() {
						if (ret.index == 1) {
							// api.execScript({
							// 	frameName: 'index_guanzhu',
							// 	script: 'video_img_t()'
							// });
							api.execScript({
								frameName: 'index_list',
								script: 'video_img()'
							});
							api.execScript({
								frameName: 'index_list',
								script: 'pay_url()'
							});
						} else if (ret.index == 0) {
							api.execScript({
								frameName: 'index_list',
								script: 'video_img_t()'
							});
						}
					}, 300)
				}else if(_win_name == 1){
					if(ret.index == 1){
						api.execScript({
							frameName: 'scrollVideo',
							script: 'scrollVideo.play();'
						});
						api.execScript({
						    frameName: 'index_footer',
						    script: 'footer_by();'
						});
						api.execScript({
							frameName: 'time',
							script: 't(' + false + ');'
						});
					}else{
						api.execScript({
							frameName: 'scrollVideo',
							script: 'scrollVideo.pause();'
						});
						api.closeFrame({
							name: 'isPlaying'
						});
						api.execScript({
						    frameName: 'index_footer',
						    script: 'footer_by(1);'
						});
						api.execScript({
							frameName: 'time',
							script: 't(' + true + ');'
						});
					}
				}else if(_win_name == 2){
					// console.log(ret.index)
					if(ret.index == 1){
						api.execScript({
							frameName: 'oxPlayer_frm',
							script: 'oxPlayer.start();'
						});
						api.execScript({
						    frameName: 'index_footer',
						    script: 'footer_by();'
						});
						api.execScript({
							frameName: 'time',
							script: 't(' + false + ');'
						});
					}else{
						api.execScript({
							frameName: 'oxPlayer_frm',
							script: 'oxPlayer.pause();'
						});
						api.execScript({
						    frameName: 'index_footer',
						    script: 'footer_by(1);'
						});
						api.execScript({
							frameName: 'time',
							script: 't(' + true + ');'
						});
					}
				}
			}
			_root = 1;
		});
		kouling();
		hongbao()
	}

	// 上一个视频
	function slidePrev() {
		api.execScript({
			frameName: _root_name,
			script: '_slidePrev()'
		});
	}
	// 下一个视频
	function slideNext() {
		api.execScript({
			frameName: _root_name,
			script: '_slideNext()'
		});
	}
	// 删除视频
	function dandel() {
		api.execScript({
			frameName: _root_name,
			script: '_dandel()'
		});
	}
	function kouling(){
		if(_getPrefs('_config').hongbao.hongbao_show == 0){ return;}
		if (_getPrefs('_config').config.app == 1) { return;}
		var clipBoard = api.require('clipBoard');
		clipBoard.get(function(ret, err) {
				if (ret) {
						// console.log(JSON.stringify(ret));
						if(ret.value){
							var reg = /##(.*)##/;
							// console.log(ret.value)
							var a = reg.exec(ret.value);
							if(a){
								a = a[1].trim();
								var b = jiemi(a);
								if(jiemi(a) == _getPrefs('_user').id){
									return;
								}
								_ajax('renwu/kouling',function(ret,err){
									if(ret){
										// console.log(JSON.stringify(ret));
										if(ret.ret){
											return setTimeout(function(){
												tan('hongbao_zhuli_user',{name:a});
												// 清空复制
												clipBoard.set({
														value: ''
												});
											},1000)
										}
									}else{
										// console.log(JSON.stringify(err));
									}
								},{name:a})
							}
						}
				}

		});
	}
	function jiemi(a) {
		var iv = CryptoJS.enc.Latin1.parse('www_suxiangw_com');
 		var key = CryptoJS.enc.Latin1.parse('20200217143510WB');
    var encoded = CryptoJS.AES.decrypt(a, key, {
	    iv: iv,
	    mode: CryptoJS.mode.CBC,
	    adding: CryptoJS.pad.ZeroPadding
		}).toString(CryptoJS.enc.Utf8)
		return encoded;
	}
	function tan(url,data){
		api.openFrame({
			name: url,
			url: _h_w + url + '.html',
			rect: {
				x: 0,
				y: 0,
				w: 'auto',
				h: 'auto',
			},
			bgColor: 'rgba(0,0,0,0)',
			pageParam:data
		})
	}
	// 弹窗红包
	function hongbao(a){
		if (_getPrefs('_config').config.app == 1) {
			return;
		}
		if(_getPrefs('_user') && _getPrefs('hongbao_open')){
			return;
		}
		setTimeout(function(){
			tan('hongbao_index')
		},a?30000:10000)
	}

	// 隐藏底部和头部动画
	function _hide_head_foot(a){
		if(!_root){
			return;
		}
		var y = 100;
		if(a){
			y = -100
		}
		api.animation({
			name: 'index_footer',
			translation: {
					x: 0,
					y: y,
					z: 0
			}
		});
		var y = -100;
		if(a){
			y = 100
		}
		api.animation({
			name: 'index_header',
			translation: {
					x: 0,
					y: y,
					z: 0
			}
		});
	}
	var hongbao_icon = true;
	// 打开奖励圆度倒计时
	function yuandu(_right_h,di_data) {
		if (_getPrefs('_config').config.app == 1) {
			return;
		} else if (api.winName != 'root') {
			return;
		}
		if(_getPrefs('_config').hongbao.hongbao_show == 1 && hongbao_icon){
			setTimeout(function(){
				url = 'hongbao_icon'
				api.openFrame({
					name: url,
					url: _h_w + url + '.html',
					rect: {
						x: 0,
						y: 0,
						w: 0,
						h: 0,
					},
					bgColor: 'rgba(0,0,0,0)',
				})
			},1000)
		}
		hongbao_icon = false;
		if (!_getPrefs('_config').time_show) {
			return;
		}
		_ajax('renwu/time_jinbi', function(ret, err) {
			if (ret) {
				// console.log(JSON.stringify(ret))
				if (ret.ret) {
					url = 'time';
					api.openFrame({
						name: url,
						url: _h_w + url + '.html',
						rect: {
							x: api.winWidth - 65,
							y: api.winHeight - _right_h,
							w: 58,
							h: 168,
						},
						bgColor: 'rgba(0,0,0,0)',
					})
					setTimeout(function() {
						if (_is_video()) {
							api.execScript({
								frameName: 'time',
								script: 't(' + true + ');'
							});
						}
					}, 1000)
				} else {
					return;
				}
			} else {
				_alert(JSON.stringify(err))
			}
		})
	}
	function goumai(){
		if (_getPrefs('_config').config.goumai == 1) {
			return;
		}
		url = 'a';
		api.openFrame({
			name: url,
			url: _h_w + url + '.html',
			rect: {
				x: 0,
				y: api.winHeight / 2,
				w: 120,
				h: 30,
			},
			bgColor: 'rgba(0,0,0,0)',
		})
	}


</script>

</html>
